package com.ad.pet.app.type.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ad.pet.R;
import com.ad.pet.common.data.utils.glide.GlideUtil;
import com.ad.pet.models.remote.type.SecondCategroy;

import java.util.List;

/**
 * Created by SEELE on 2018/8/2.
 */

public class TypeGoodAdapter extends BaseQuickAdapter<SecondCategroy,BaseViewHolder> {
    public TypeGoodAdapter( @Nullable List<SecondCategroy> data) {
        super(R.layout.item_ali_type_good_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SecondCategroy item) {
        ImageView iv_good = helper.getView(R.id.iv_good);
        TextView tv_good= helper.getView(R.id.tv_good);
        tv_good.setText(item.getName());
        GlideUtil.load(mContext,item.getImg(),iv_good);

    }
}
